#!/usr/bin/perl -w

my $prefix = '/usr/local/share/bootka';
#my $prefix = '.';

print "Na ktorym urzadzeniu zainstalowac ? \n";
#install device
my $install_device = <>;
chomp( $install_device );

#label
system ( $prefix . '/label' );
#sync
system ( 'sync' );

print "Zainstalowac na $install_device (t/n)\n";
my $tak_nie = <>;
chomp( $tak_nie );

if ( $tak_nie =~ /[tT]/ ) {

    #inst
    system ( $prefix . '/inst' );

    #dd bhw > install_device
    system ( "dd if=/boot/bhw of=$install_device conv=notrunc bs=446 count=1" );

}
